package com.icim.xmtm.dao;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.icim.xmtm.entity.CtSlimifRetBox;

@Repository
public class CtSlimifRetBoxDao {
    @Resource
    private JdbcTemplate xmtmJdbcTemplate;

    public void save(CtSlimifRetBox box) {
 //       String sql = "INSERT INTO CT_SLIMIFRETBOX (vendorcode,productspecname,thickness,targetproductspecname,"
    	String sql = "INSERT INTO V_CT_SLIMIFRETBOX_HC (vendorcode,productspecname,thickness,targetproductspecname,"
                + "targetthickness,producttype,productnumber,boxname,boxtype,boxquantity,slotmap,"
                + "integrationlevel,receiveflag,releaseflag,unpackflag,deliverytime,receivestate,destination) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

        xmtmJdbcTemplate.update(sql, new Object[] { box.getVendorcode(), box.getProductspecname(), box.getThickness(),
                box.getTargetproductspecname(), box.getTargetthickness(), box.getProducttype(), box.getProductnumber(),
                box.getBoxname(), box.getBoxtype(), box.getBoxquantity(), box.getSlotmap(), box.getIntegrationlevel(),
                box.getReceiveflag(), box.getReleaseflag(), box.getUnpackflag(), box.getDeliverytime(),box.getReceivestate(),box.getDestination() });
    }
}
